<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>Connect</title>
</head>

<body>
    <?php
    $conn = @new mysqli('120.46.142.115', 'root', '', 'mybbs');
    if ($conn->connect_errno != 0) {
        die("数据库连接错误！" . $conn->connect_error); //输出括号内内容后终止程序执行
    }
    $conn->query("set name utf8");
    ?>
</body>

</html>